package com.mwyq.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.github.abel533.echarts.Option;
import com.mwyq.service.ECharsService;

import net.sf.json.JSON;
import net.sf.json.JSONObject;
@RestController
@RequestMapping("entity")
public class EnitiyController {

	@Autowired
	public ECharsService ecService;
	
	@RequestMapping(value="/getOption")
	public String getOption(){
		
		Option option = ecService.getOption();
		JSON json = JSONObject.fromObject(option);
		System.out.println(json);
		return json.toString();
	}
}
